<?php $this->header(); ?>
<div class="wrap">
    <?php include 'Setting_nav.php'; ?>
    <div class="h_a">网站基本设置</div>
    <form class="J_ajaxForm" action="/?g=Admin&m=Setting&a=updateSiteSetting" method="post">
        <div class="table_full">
            <table width="100%">
                <col class="th" />
                <col width="400" />
                <col />
                <tr>
                    <th>网站状态</th>
                    <td>
                        <label><input type="radio" name="sitestatus" value="0" <?php if ($setting['sitestatus']['value'] == 0): ?>checked="checked"<?php endif; ?>><span>关闭</span></label>
                        <label><input type="radio" name="sitestatus" value="1" <?php if ($setting['sitestatus']['value'] == 1): ?>checked="checked"<?php endif; ?>><span>开启</span></label>
                    </td>
                    <td></td>
                </tr>
                <tr class="close" style="display:none;">
                    <th>关闭原因</th>
                    <td>
                        <textarea name="closeReason" class="length_5"><?php echo empty($setting['closeReason']['value']) ? '网站升级维护中' : $setting['closeReason']['value']; ?></textarea>
                    </td>
                    <td><div class="fun_tips"></div></td>
                </tr>
                <tr>
                    <th>网站标题</th>
                    <td>
                        <input type="text" class="input length_5" name="sitetitle" value="<?php echo $setting['sitetitle']['value']; ?>">
                    </td>
                    <td><div class="fun_tips">一个响亮的标题，可以让访客知道您的网站是做啥的</div></td>
                </tr>
                <tr>
                    <th>网站域名</th>
                    <td>
                        <input type="text" class="input length_5" name="siteurl" value="<?php echo $setting['siteurl']['value']; ?>">
                    </td>
                    <td><div class="fun_tips">必须带<font color="red">http://</font>否则会导致某些接口失效，且结尾没有/！<br />例如：http://www.pescms.com</div></td>
                </tr>
                <tr>
                    <th>网站LOGO</th>
                    <td>
                        <?php echo $func->formList($logo); ?>
                    </td>
                </tr>
                <tr>
                    <th>网站关键词</th>
                    <td>
                        <input type="text" class="input length_5" name="seo_keyword" value="<?php echo $setting['seo_keyword']['value']; ?>">
                    </td>
                    <td><div class="fun_tips">填写合适的关键词，有利于网站的SEO</div></td>
                </tr>
                <tr>
                    <th>网站描述</th>
                    <td>
                        <textarea name="seo_description" class="length_5"><?php echo $setting['seo_description']['value']; ?></textarea>
                    </td>
                    <td><div class="fun_tips">描述应该控制在220个字符即110个文字以内</div></td>
                </tr>
                <tr>
                    <th>页脚代码</th>
                    <td>
                        <textarea name="footerCode" class="length_5"><?php echo $setting['footerCode']['value']; ?></textarea>
                    </td>
                    <td><div class="fun_tips">页脚代码通常用于放一些第三方的统计代码或者一些客服之类的代码</div></td>
                </tr>
            </table>
        </div>
        <div class="btn_wrap">
            <div class="btn_wrap_pd">
                <button class="btn btn_submit J_ajax_submit_btn" type="submit">提交</button>
            </div>
        </div>
    </form>
</div>
<script>
    uetjs.setting = function() {
        $(document).ready(function() {
            if ($("input[name=sitestatus]").eq(0).is(":checked") == true) {
                $(".close").show();
            }
            $("input[name=sitestatus]").on("change", function() {
                if ($(this).val() == '0') {
                    $(".close").show();
                } else {
                    $(".close").hide();
                }
            })
        });
    }
</script>
<?php $this->footer(); ?>